$('body').click(function() {
  if (!$.cookie('LoginAccount')) {
    $.cookie('LoginAccount', '', -1);
    location.href = "login.html";
  } else {
    var date = new Date();
    date.setTime(date.getTime() + (60 * 60 * 1000));
    $.cookie('LoginAccount', $.cookie('LoginAccount'), {
      expires: date
    });
  }
})
if (!$.cookie('LoginAccount')) {
  $.cookie('LoginAccount', '', -1);
  location.href = "login.html";
}
$('#logout').click(function() {
  $.cookie('LoginAccount', '', -1);
  location.href = "login.html";
})
var CurXueHao = $.cookie('LoginAccount').split('%')[0];
var CurXingMing = $.cookie('LoginAccount').split('%')[1];
var CurPersonId = $.cookie('LoginAccount').split('%')[2];
var CurLeiBie = $.cookie('LoginAccount').split('%')[3];
if ($.cookie('LoginAccount').split('%')[4] == '1') {
  alert('您正在使用默认密码，请及时修改！');
  $('.page-content').load('user_setting.html');
}
$('#CurXingMing').html('&nbsp&nbsp&nbsp' + (CurLeiBie == '1' ? '教师：' : '学生：') + CurXingMing + '&nbsp&nbsp&nbsp');
if (CurLeiBie == '1') {
  $('.teacher_item').show();
  $('.student_item').remove();
}else{
  $('.teacher_item').remove();
  $('.student_item').show();
}
$('#bank_info').click(function() {
  $('.page-content').load('bank_info.html');
})
$('#user_setting').click(function() {
  $('.page-content').load('user_setting.html');
})
$('#bumenguanli').click(function() {
  $('.page-content').load('BuMenTree.html');
})
$('#yonggongjiaoshi').click(function() {
  $('.page-content').load('BuMenTree_YGJS.html');
})
$('#WorkersSetting').click(function() {
  $('.page-content').load('BuMenTree_worker.html');
})
$('#GongZuoLiangShenPi').click(function() {
  $('.page-content').load('WorkShenHe_list.html');
})
$('#GongZuoLiangCommit').click(function() {
  $('.page-content').load('GongZuoLiangList.html');
})
